package com.mrd.modules.system.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mrd.modules.system.dao.SysUserDao;
import com.mrd.modules.system.entity.SysUserEntity;
import com.mrd.modules.system.service.SysUserService;



@Service("sysUserService")
public class SysUserServiceImpl implements SysUserService {
  @Autowired
  private SysUserDao sysUserDao;

  @Override
  public SysUserEntity queryObject(Integer id) {
    return sysUserDao.queryObject(id);
  }

  @Override
  public List<SysUserEntity> queryList(Map<String, Object> map) {
    return sysUserDao.queryList(map);
  }

  @Override
  public int queryTotal(Map<String, Object> map) {
    return sysUserDao.queryTotal(map);
  }

  @Override
  public void save(SysUserEntity sysUser) {
    sysUserDao.save(sysUser);
  }

  @Override
  public void update(SysUserEntity sysUser) {
    sysUserDao.update(sysUser);
  }

  @Override
  public void delete(Integer id) {
    sysUserDao.delete(id);
  }

  @Override
  public void deleteBatch(Integer[] ids) {
    sysUserDao.deleteBatch(ids);
  }

  /**
   * 根据用户名和密码登陆
   * 
   * @author han
   * @param sysUer
   * @return SysUserEntity
   */
  @Override
  public SysUserEntity queryByUserNamePwd(SysUserEntity sysUer) {
    return sysUserDao.queryByUserNamePwd(sysUer);
  }

  /**
   * 查询单个对象
   * 
   * @author han
   * @param sysUer
   * @return
   */
  public SysUserEntity queryOneObject(SysUserEntity sysUer) {
    return sysUserDao.queryOneObject(sysUer);
  }
}
